<?php

$cars = array("111","222","333");
$cars[1] = "Landrover";
echo $cars[1];


echo"<pre>";
print_r($cars);
echo count($cars);

echo"<hr/>";
echo"foreach::.<br/>";
foreach($cars as $value){
    echo $value."<br/>";
}
echo"<hr/>";
echo"for.<br/>";
$len = count($cars);
for ($i = 0; $i < $len; $i++){
    echo $cars[$i]."<br/>";
}
//第四周星期一作业。
/*$grades = array("一","二","三","四","五","六","七","八","九","十","十一","十二");



form>
    第<select name="grade">
        <?php foreach($grades as $value ):?>
        <option value="<?php echo $value;?>"><?php echo $value;?></option>
        <?php endforeach;?>
    </select>周
</form-->*/
echo"<br/>";
foreach ($cars as $value){
    echo $value."<br/>";
}
$message = array(
    'pic' => "imges/2.jpg",
    'name' =>"avatar",
    'content' =>'天天好心情11<span> (来自火星"女侠"的留言)</span>',
    'sex' =>'male'
);

foreach ($message as $key => $value){
    echo $key . "=>" . $value . "<br/>";
}
?>